Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing deprecation warnings for 2025.1 #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jringuette
Copy link

Hi there, trying to fix warnings prior to release of 2025.1

First off, i'm not familiar with Python and all its ecosystem, i've been programming mainly in java for the last 25 years, so if you want me to change anything, just let me know.

These are the warnings i'm getting when booting a recent 2024 build of HASS:

2024-06-23 00:23:08.985 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from schluter, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'schluter' custom integration
2024-06-23 00:23:08.990 WARNING (ImportExecutor_0) [homeassistant.const] ENERGY_KILO_WATT_HOUR was used from schluter, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please report it to the author of the 'schluter' custom integration
2024-06-23 00:23:08.991 WARNING (ImportExecutor_0) [homeassistant.const] POWER_WATT was used from schluter, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please report it to the author of the 'schluter' custom integration
2024-06-23 00:23:08.993 WARNING (ImportExecutor_0) [homeassistant.const] TEMP_CELSIUS was used from schluter, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'schluter' custom integration
2024-06-23 00:23:09.001 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.schluter.climate.SchluterThermostat'>) implements HVACMode(s): heat, auto, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/Ingos11/ha-schluter/issues

I've changed the constants as suggested for the first four items.

For the last one, i've found this blog post explaining what needed to be done. Looking at the code for the turn_on and turn_off show indeed that it will work.

@@ -1,6 +1,6 @@
{
"name": "ludeeus/integration_blueprint",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11-bullseye",
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.12-bullseye",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 2024.5.3 was complaining it needed python 3.12

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this is required

Comment on lines +97 to +98
# Assume Python 3.12
target-version = "py312"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this is required

@jringuette
Copy link
Author

Hi @IngoS11,
did you had any time to look at this PR? Anything i can do to get that merged?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant